package com.itheima.mq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//@Component //下面弄2个消费者监听
public class SpringRabbitListener {
    @RabbitListener(queues = "simple.queue")
    public void listenerQueueMessage(String message) {
        System.out.println("消费者1接收到的消息是：" + message);
    }
    @RabbitListener(queues = "simple.queue")
    public void listenerQueueMessage2(String message) {
        System.out.println("消费者2接收到的消息是：" + message);
    }
}
